Version

ApplyFixedValuesFilter(Int32,Boolean,String[]) Method

Applies a FixedValuesFilter to the column.
Syntax
'Declaration
 
Public Overloads Function ApplyFixedValuesFilter( _
   ByVal relativeColumnIndex As Integer, _
   ByVal includeBlanks As Boolean, _
   ByVal ParamArray displayValues() As String _
) As FixedValuesFilter
public FixedValuesFilter ApplyFixedValuesFilter( 
   int relativeColumnIndex,
   bool includeBlanks,
   params string[] displayValues
)

Parameters

relativeColumnIndex
A zero based column index relative to the Region
includeBlanks
The value which indicates whether blank cells should be filtered in.
displayValues
The collection of case-insensitively unique cell text values which should be filtered in.
Exceptions
ExceptionDescription
System.ArgumentNullExceptiondisplayValues is null.
System.ArgumentNullExceptionA value in the displayValues collection is null.
System.ArgumentExceptionMultiple values from the displayValues collection are case-insensitively equal.
System.InvalidOperationExceptionincludeBlanks is False and displayValues has no items. At least one value must be allowed.
System.InvalidOperationExceptionIf the Region was not set.
System.ArgumentOutOfRangeExceptionIf the relativeColumnIndex is outside of the Region.
Remarks

Note: If any text values are longer than 255 characters in length and the workbook is saved in one of the 2003 formats, the correct rows will be hidden in the saved file, but the filter may be missing from the column or reapplying the filter may hide some of the matching cells.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also